package mathModel;

import java.util.ArrayList;

public class Statistics {
	private ArrayList<Integer> year;
	private ArrayList<Double> value;
	
	public Statistics(int year, double value){
		this.year.add(year);
		this.value.add(value);
	}
	
	public Statistics(){
		this.value = new ArrayList<Double>();
		this.year = new ArrayList<Integer>();
	}
	
	public Statistics(ArrayList<Integer> year, ArrayList<Double> value){
		this.value = value;
		this.year = year;
	}
	
	public void add(int year, double value){
		this.year.add(year);
		this.value.add(value);
	}
	
	public int getYear(int i){
		return year.get(i);
	}
	
	public double getValue(int i){
		return value.get(i);
	}
	
	public double getValueAt(int year){
		return value.get(this.year.indexOf(year));	
	}
	
	public int size(){
		return year.size();
	}
	
}
